import { axios } from '@/utils/request'

export function select(parameter) {
  return axios({
    url: '/sys/sysUser/select/' + parameter.id,
    method: 'get'
  })
}

export function selectPage(parameter) {
  return axios({
    url: '/sys/sysUser/selectList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/sys/sysUser/delete/' + parameter,
    method: 'get'
  })
}

export function save(parameter) {
  return axios({
    url: '/sys/sysUser/addOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function login(parameter) {
  return axios({
    url: '/sys/sysUser/login',
    method: 'post',
    params: parameter
  })
}

export function logout () {
  return axios({
    url: '/sys/sysUser/logout',
    method: 'post'
  })
}

export function getInfo () {
  return axios({
    url: '/sys/sysUser/getUserInfo',
    method: 'get'
  })
}


export function deleteBatch(parameter) {
  return axios({
    url: '/sys/sysUser/deleteBatch',
    method: 'post',
    data:{
      'users':parameter
    }
  })
}